Integrand size = 29, antiderivative size = 62 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {x}{2 a}+\frac {\cos (c+d x)}{a d}-\frac {\cos ^3(c+d x)}{3 a d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a d} \]
Time = 0.19 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.74 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {6 c+6 d x+9 \cos (c+d x)-\cos (3 (c+d x))-3 \sin (2 (c+d x))}{12 a d} \]
Time = 0.36 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.90, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {3042, 3318, 3042, 3113, 2009, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^2(c+d x) \cos ^2(c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^2 \cos (c+d x)^2}{a \sin (c+d x)+a}dx\) |
\(\Big \downarrow \) 3318 |
\(\displaystyle \frac {\int \sin ^2(c+d x)dx}{a}-\frac {\int \sin ^3(c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sin (c+d x)^2dx}{a}-\frac {\int \sin (c+d x)^3dx}{a}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {\int \sin (c+d x)^2dx}{a}+\frac {\int \left (1-\cos ^2(c+d x)\right )d\cos (c+d x)}{a d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\int \sin (c+d x)^2dx}{a}+\frac {\cos (c+d x)-\frac {1}{3} \cos ^3(c+d x)}{a d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {\frac {\int 1dx}{2}-\frac {\sin (c+d x) \cos (c+d x)}{2 d}}{a}+\frac {\cos (c+d x)-\frac {1}{3} \cos ^3(c+d x)}{a d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\cos (c+d x)-\frac {1}{3} \cos ^3(c+d x)}{a d}+\frac {\frac {x}{2}-\frac {\sin (c+d x) \cos (c+d x)}{2 d}}{a}\) |
3.3.99.3.1 Defintions of rubi rules used
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g^2/a Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Simp[g^2/(b*d) Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0]
Time = 0.17 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.73
method | result | size |
parallelrisch | \(\frac {6 d x +9 \cos \left (d x +c \right )-\cos \left (3 d x +3 c \right )-3 \sin \left (2 d x +2 c \right )+8}{12 d a}\) | \(45\) |
risch | \(\frac {x}{2 a}+\frac {3 \cos \left (d x +c \right )}{4 a d}-\frac {\cos \left (3 d x +3 c \right )}{12 a d}-\frac {\sin \left (2 d x +2 c \right )}{4 d a}\) | \(56\) |
derivativedivides | \(\frac {\frac {8 \left (\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}+\frac {1}{6}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(77\) |
default | \(\frac {\frac {8 \left (\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}+\frac {1}{6}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(77\) |
norman | \(\frac {\frac {\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {5 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {x}{2 a}+\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}+\frac {2 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {3 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {3 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {4}{3 a d}+\frac {3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d a}+\frac {13 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}+\frac {13 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) | \(343\) |
Time = 0.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.73 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {2 \, \cos \left (d x + c\right )^{3} - 3 \, d x + 3 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 6 \, \cos \left (d x + c\right )}{6 \, a d} \]
Leaf count of result is larger than twice the leaf count of optimal. 563 vs. \(2 (46) = 92\).
Time = 3.69 (sec) , antiderivative size = 563, normalized size of antiderivative = 9.08 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\begin {cases} \frac {3 d x \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} + \frac {9 d x \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} + \frac {9 d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} + \frac {3 d x}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} + \frac {6 \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} + \frac {24 \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} - \frac {6 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} + \frac {8}{6 a d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a d} & \text {for}\: d \neq 0 \\\frac {x \sin ^{2}{\left (c \right )} \cos ^{2}{\left (c \right )}}{a \sin {\left (c \right )} + a} & \text {otherwise} \end {cases} \]
Piecewise((3*d*x*tan(c/2 + d*x/2)**6/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*t an(c/2 + d*x/2)**4 + 18*a*d*tan(c/2 + d*x/2)**2 + 6*a*d) + 9*d*x*tan(c/2 + d*x/2)**4/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18*a* d*tan(c/2 + d*x/2)**2 + 6*a*d) + 9*d*x*tan(c/2 + d*x/2)**2/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18*a*d*tan(c/2 + d*x/2)**2 + 6* a*d) + 3*d*x/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18* a*d*tan(c/2 + d*x/2)**2 + 6*a*d) + 6*tan(c/2 + d*x/2)**5/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18*a*d*tan(c/2 + d*x/2)**2 + 6*a* d) + 24*tan(c/2 + d*x/2)**2/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18*a*d*tan(c/2 + d*x/2)**2 + 6*a*d) - 6*tan(c/2 + d*x/2)/(6*a* d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18*a*d*tan(c/2 + d*x/ 2)**2 + 6*a*d) + 8/(6*a*d*tan(c/2 + d*x/2)**6 + 18*a*d*tan(c/2 + d*x/2)**4 + 18*a*d*tan(c/2 + d*x/2)**2 + 6*a*d), Ne(d, 0)), (x*sin(c)**2*cos(c)**2/ (a*sin(c) + a), True))
Leaf count of result is larger than twice the leaf count of optimal. 156 vs. \(2 (56) = 112\).
Time = 0.29 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.52 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {12 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - 4}{a + \frac {3 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} - \frac {3 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{3 \, d} \]
-1/3*((3*sin(d*x + c)/(cos(d*x + c) + 1) - 12*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 4)/(a + 3*a*sin(d*x + c) ^2/(cos(d*x + c) + 1)^2 + 3*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + a*sin( d*x + c)^6/(cos(d*x + c) + 1)^6) - 3*arctan(sin(d*x + c)/(cos(d*x + c) + 1 ))/a)/d
Time = 0.43 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.21 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {3 \, {\left (d x + c\right )}}{a} + \frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3} a}}{6 \, d} \]
1/6*(3*(d*x + c)/a + 2*(3*tan(1/2*d*x + 1/2*c)^5 + 12*tan(1/2*d*x + 1/2*c) ^2 - 3*tan(1/2*d*x + 1/2*c) + 4)/((tan(1/2*d*x + 1/2*c)^2 + 1)^3*a))/d
Time = 11.99 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.06 \[ \int \frac {\cos ^2(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {x}{2\,a}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {4}{3}}{a\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^3} \]